<% if object.errors.any? %>
<div id="error_explanation">
  <div class="alert alert-error">
    <%= name %>包含<%= object.errors.count %>个错误
  </div>
  <ul>
    <% object.errors.full_messages.each do |msg| %>
    <li>* <%= msg %></li>
    <% end %>
  </ul>
</div>
<% end %>
